// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode 

//@@TODO: Still some major work here to do
// I think we should probably build a basic Paper screen to see, then add 
// pages to it. The plan would be to have it like so:
// Page 1: Clan Name:, Clan Description:
// Page 2: Usernames. 

package net.minecraft.src;


// Referenced classes of package net.minecraft.src:
//            TileEntity, NBTTagCompound, Packet130UpdateSign, Packet

public class TileEntityClanDeed extends TileEntity
{

    public TileEntityClanDeed()
    {
        lineBeingEdited = -1;
        isEditAble = true;
    }

    public void writeToNBT(NBTTagCompound nbttagcompound)
    {
        super.writeToNBT(nbttagcompound);
        nbttagcompound.setString("Clan Name:", ClanDeedText[0]);
        nbttagcompound.setString("Text2", ClanDeedText[1]);
        nbttagcompound.setString("Text3", ClanDeedText[2]);
        nbttagcompound.setString("Text4", ClanDeedText[3]);
        nbttagcompound.setString("Text5", ClanDeedText[3]);
    }

    public void readFromNBT(NBTTagCompound nbttagcompound)
    {
        isEditAble = false;
        super.readFromNBT(nbttagcompound);
        for(int i = 0; i < 4; i++)
        {
        	ClanDeedText[i] = nbttagcompound.getString((new StringBuilder()).append("Text").append(i + 1).toString());
            if(ClanDeedText[i].length() > 15)
            {
            	ClanDeedText[i] = ClanDeedText[i].substring(0, 15);
            }
        }

    }

    public Packet getDescriptionPacket()
    {
        String as[] = new String[4];
        for(int i = 0; i < 4; i++)
        {
            as[i] = ClanDeedText[i];
        }

        return new Packet130UpdateSign(xCoord, yCoord, zCoord, as);
    }

    public boolean getIsEditAble()
    {
        return isEditAble;
    }

    public void func_32001_a(boolean flag)
    {
        isEditAble = flag;
    }

    public String ClanDeedText[] = {
        "", "", "", "",""
    };
    public int lineBeingEdited;
    private boolean isEditAble;
}
